Skip to content

Conversation

@jordan-powers
Copy link
Contributor

…stic#124594)

This patch builds on the work in elastic#122999 and elastic#113757 to natively store
array offsets for numeric fields instead of falling back to ignored source
when `source_keep_mode: arrays`.

(cherry picked from commit 376abfe)

# Conflicts:
#	server/src/main/java/org/elasticsearch/index/IndexVersions.java
#	server/src/main/java/org/elasticsearch/index/mapper/NumberFieldMapper.java
Fix and unmute testSynthesizeArrayRandomIgnoresMalformed

(cherry picked from commit 2ff03ac)

# Conflicts:
#	muted-tests.yml
Previously, when calculating the offsets, we just compared the values as-is
without any loss of precision. However, when the values were saved into doc
values and loaded in the doc values loader, they could have lost precision.
This meant that values that were not duplicates when calculating the
offsets could now be duplicates in the doc values loader. This interfered
with the de-duplication logic, causing incorrect values to be returned.

My solution is to apply the precision loss before calculating the offsets,
so that both the offsets calculation and the SortedNumericDocValues
de-duplication see the same values as duplicates.

(cherry picked from commit db73175)
@jordan-powers jordan-powers added :StorageEngine/Mapping The storage related side of mappings auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) labels Mar 21, 2025
@elasticsearchmachine elasticsearchmachine merged commit d3eff03 into elastic:8.x Mar 21, 2025
15 checks passed
@jordan-powers jordan-powers deleted the backport/8.x/pr-124594_pr-125337_pr-125354 branch March 21, 2025 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport :StorageEngine/Mapping The storage related side of mappings v8.19.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants